<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>vue.extend  全局操作</title>
	<script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
	<h1>vue.extend  全局操作</h1>
	<hr>
	<author></author>
	<div id="app">
		<div>{{message}}</div>
		<div><button @click="add">add</button></div>
		<ol>
			<li v-for="val in arr">{{val}}</li>
		</ol>
		<div><button onclick="del()">del</button></div>
	</div>

</body>
<script type="text/javascript">
function del() {
	app.arr[2]='ccccccc';
	// Vue.set(app.arr,1,'aaaaaaaaaaaaaaa');
}
var outData={
	message:0,
	color:'green',
	arr:[123,2434,454]
}
var app = new Vue({
	el:'#app',
	data:outData,
	methods:{
		add:function () {
			this.message++;
			this.arr[1]='dddd';
		}
	}
})
</script>
</html>